package com.zzyl.nursing.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 护理任务执行数据传输对象
 * 用于接收护理任务执行相关的参数
 */
@Data
@ApiModel(value = "NursingExecuteTask", description = "护理任务执行请求参数")
public class NursingExecuteTaskDto {

    @ApiModelProperty(value = "执行时间", required = true, example = "2024-09-27 08:30:00")
    @NotBlank(message = "执行时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime estimatedServerTime;

    @ApiModelProperty(value = "执行记录", required = true, example = "已按标准流程完成洗头服务，老人状态良好")
    @NotBlank(message = "执行记录不能为空")
    private String mark;

    @ApiModelProperty(value = "护理任务ID", required = true, example = "191")
    @NotNull(message = "护理任务ID不能为空")
    private Long taskId;

    @ApiModelProperty(value = "任务图片", example = "https://itheim.oss-cn-beijing.aliyuncs.com/task123.jpg",
            notes = "图片URL地址，可选填")
    private String taskImage;
}
